package com.yf.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yf.domain.TsRole;
import com.yf.service.TsRoleService;
import com.yf.mapper.TsRoleMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
* @author yangfeng
* @description 针对表【ts_role】的数据库操作Service实现
* @createDate 2024-03-28 14:49:28
*/
@Service
public class TsRoleServiceImpl extends ServiceImpl<TsRoleMapper, TsRole>
    implements TsRoleService{
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    @Override
    public void addRole(String name) {
        TsRole r = new TsRole();
        r.setRoleName(name);
        save(r);
//        String s = null;
//        System.out.println(s.length());
    }
}




